package com.ag.bean;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbDetailShift entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_DETAIL_SHIFT", schema = "dbo", catalog = "AGDB")
public class TbDetailShift implements java.io.Serializable {

	// Fields

	private String dsName;
	private TbShiftType tbShiftType;
	private Date dsDate;
	private Date dsTimeend;
	private String a;
	private String b;
	private String c;
	private Set<TbSched> tbScheds = new HashSet<TbSched>(0);

	// Constructors

	/** default constructor */
	public TbDetailShift() {
	}

	/** minimal constructor */
	public TbDetailShift(String dsName) {
		this.dsName = dsName;
	}

	/** full constructor */
	public TbDetailShift(String dsName, TbShiftType tbShiftType, Date dsDate,
			Date dsTimeend, String a, String b, String c, Set<TbSched> tbScheds) {
		this.dsName = dsName;
		this.tbShiftType = tbShiftType;
		this.dsDate = dsDate;
		this.dsTimeend = dsTimeend;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbScheds = tbScheds;
	}

	// Property accessors
	@Id
	@Column(name = "DS_NAME", unique = true, nullable = false, length = 10)
	public String getDsName() {
		return this.dsName;
	}

	public void setDsName(String dsName) {
		this.dsName = dsName;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PS_ID")
	public TbShiftType getTbShiftType() {
		return this.tbShiftType;
	}

	public void setTbShiftType(TbShiftType tbShiftType) {
		this.tbShiftType = tbShiftType;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DS_DATE", length = 23)
	public Date getDsDate() {
		return this.dsDate;
	}

	public void setDsDate(Date dsDate) {
		this.dsDate = dsDate;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DS_TIMEEND", length = 23)
	public Date getDsTimeend() {
		return this.dsTimeend;
	}

	public void setDsTimeend(Date dsTimeend) {
		this.dsTimeend = dsTimeend;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbDetailShift")
	public Set<TbSched> getTbScheds() {
		return this.tbScheds;
	}

	public void setTbScheds(Set<TbSched> tbScheds) {
		this.tbScheds = tbScheds;
	}

}